﻿<UserControl x:Class="FR.SAFTAnalyser.Views.SaftView" 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             MinHeight="300" MinWidth="500">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="50*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="50*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="50*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="auto" />
        </Grid.ColumnDefinitions>

        <Border x:Name="GridSaftFile" Grid.Row="0" Grid.ColumnSpan="2" Margin="3" Background="#007ACC">
            <TextBlock Text="{Binding SaftFileName}" ToolTip="Por favor, coloque aqui o ficheiro SAFT." 
                       AllowDrop="True" Drop="SaftFile_Drop" FontSize="16" Padding="5" TextWrapping="Wrap"/>
        </Border>
        <Button Command="{Binding OpenSaftFileCommand}" Grid.Column="1" Grid.Row="1"  Margin="5" Padding="3" Height="35" Width="35" Content="..." HorizontalAlignment="Right"/>
        <Button Content="Valida Schema" Margin="5" Padding="5" Height="35" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right"
                Command="{Binding DoValidateSchemaCommand}" />

        <Border x:Name="PublicKeyFile" Grid.Row="2" Grid.ColumnSpan="2" Margin="3" Background="#007ACC">
            <TextBlock Text="{Binding PublicKeyFileName}" ToolTip="Por favor, coloque aqui o ficheiro com a chave pública."
                       AllowDrop="True" Drop="PublicKeyFile_Drop" FontSize="16" Padding="5" TextWrapping="Wrap"/>
        </Border>
        <Button Command="{Binding OpenPublicKeyFileCommand}" Grid.Column="1" Grid.Row="3" Margin="5" Padding="3" Height="35" Width="35" Content="..." HorizontalAlignment="Right"/>
        <Button Command="{Binding DoValidateHashCommand}" Content="Valida Hash" Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right"  Margin="0,5,5,5" Padding="3" Height="35" Width="87"/>

        <Border x:Name="PrivateKeyFile" Grid.Row="4" Grid.ColumnSpan="2" Margin="3" Background="#007ACC">
            <TextBlock Text="{Binding PrivateKeyFileName}" ToolTip="Por favor, coloque aqui o ficheiro com a chave privada."
                       AllowDrop="True" Drop="PublicKeyFile_Drop" FontSize="16" Padding="5" TextWrapping="Wrap"/>
        </Border>
        <Button Command="{Binding OpenPrivateKeyFileCommand}" Grid.Column="1" Grid.Row="5"  Margin="5" Padding="3" Height="35" Width="35" Content="..." HorizontalAlignment="Right"/>
        <Button Command="{Binding GenerateHashCommand}" Grid.Column="0" Grid.Row="5" Margin="0,5,5,5" Padding="3" Height="35" Content="Criar Hash" HorizontalAlignment="Right" Width="87"/>

    </Grid>
</UserControl>
